package furnitures 
{
	import flash.geom.Point;
	import furnitures.parts.Box;
	import simple3D.core.Container3D;
	/**
	 * ...
	 * @author Dmitriy Gaiduk
	 */
	public class FurnitureFactory 
	{
		
		public function FurnitureFactory() 
		{
			
		}
		
		
		public static function createUpperCabinetR1000():FurnitureModel
		{
			var edgePoints:Array = edgePoints = [[0, 0], [60, 0], [60, 30], [0, 30, 30, 45], [0, 0]];
			var height:Number = 70;
			var model:FurnitureModel = new FurnitureModel(edgePoints, height);
			var face:FurnitureFace = new FurnitureFace(3);
			var door:Box = new Box(new Point(0, 0), new Point(0.5, 0.5));
			face.addDoor(door);
			face.addDoor(new Box(new Point(0.5, 0), new Point(1, 0.5)));
			model.addFace(face);
			model.positionY = -90;
			model.hasTabletop = false;
			return model;
		}
		
		public static function createCornerCabinet90x90():FurnitureModel
		{
			var edgePoints:Array = edgePoints = [[0, 0], [90, 0], [90, 90], [30, 90], [30, 60], [0, 60], [0, 0]];
			var height:Number = 70;
			var model:FurnitureModel = new FurnitureModel(edgePoints, height);
			var face:FurnitureFace = new FurnitureFace(4);
			face.addDoor(new Box(new Point(0, 0), new Point(1, 1)));
			model.addFace(face);
			
			face = new FurnitureFace(5);
			face.addDoor(new Box(new Point(0, 0), new Point(1, 1)));
			model.addFace(face);
			model.positionY = 0;
			model.hasTabletop = true;
			return model;
		}
		
		public static function createCornerCabinetRadius90():FurnitureModel
		{
			var edgePoints:Array = [[0, 0], [90, 0], [90, 90], [30, 90], [0, 60, 30,60], [0, 0]];
			var height:Number = 70;
			var model:FurnitureModel = new FurnitureModel(edgePoints, height);
			var face:FurnitureFace = new FurnitureFace(4);
			face.addDoor(new Box(new Point(0, 0), new Point(1, 1)));
			model.addFace(face);
			
			model.positionY = 0;
			model.hasTabletop = true;
			return model;
		}
	}

}